<?php
    include("./dbconn.php");

    $id = $_GET['id'];
    $sql = "delete from midata where Id = $id order by Id desc";

    if($conn->query($sql)){
        $data["code"] = 0;
    }else{
        $data["code"] = 1;
    }
    $data["flag"] = true;
    echo json_encode($data);
?>